<%@page import="vo.Order"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="java.util.*" isELIgnored="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>购物车</title>
</head>
<body>

<h1 align="center" >购物车</h1>
<table align='center' border='1' cellspacing='0'>
	<tr>
	<td colspan="6">
	<a href="Login?method=index">返回主页</a>
	<a href="#"  onclick="deleteall('listOrderItem?status=deletequery&ids=');">批量删除</a>
	</td>
	</tr>
    <tr>
        <td></td>
        <td>商品</td>
		<td>用户</td>
		<td>数量</td>
		<td>小计</td>
		<td>操作</td>
		
    </tr> 
    <c:forEach items="${orderitem}" var="order" varStatus="st">
        <tr>
        	<td><input type="checkbox" name="child" value="${order.good.gid}" onclick="chickchild();"></td>
            <td>${order.good.gName}</td>
            <td>${order.user.uname}</td>
            <td>${order.oNum}</td>
            <td><fmt:formatNumber type="CURRENCY" value="${order.oNum*order.good.gPrice}" maxFractionDigits="2"/></td>
            <td><a href="listOrderItem?status=delete&&id=${order.good.gid}">删除</a></td>
        </tr>
    </c:forEach>
    <tr>
	    <td colspan="7" align="center">
	    	<a href="listOrderItem?status=selectall&start=0">首页</a>&emsp;
			<a href="listOrderItem?status=selectall&status=selectpage&start=${prePage}">前一页</a>&emsp;
			<a href="listOrderItem?status=selectall&status=selectpage&start=${nextPage}">后一页</a>&emsp;
			<a href="listOrderItem?status=selectall&status=selectpage&start=${totalPage-1}">尾页</a>&emsp;
		</td>
	</tr>
	<tr>
		<td colspan="7">
			<input type="checkbox" id="checkAll" name="checkAll" onclick="selectAll();">全选
			<input type="checkbox" id="recheck" onclick="notSelectAll()">反选
		</td>
	</tr>
	<tr><td colspan="7">当前记录数:${size}&emsp;总记录数：${totalsize}</td></tr>
	<tr colspan="4">
		<td align="center" colspan="6">
		<form action="listOrderItem?status=submit" method="post">
		<input type="hidden" name="ois" >
		<input type="submit" value="确认订单">
		</form>
		</td>
	</tr> 
</table>
<script type="text/javascript" src="Resources/js/check.js"></script>
</body>
</html>

